<div class="page-content">
	<!-- BEGIN PAGE HEADER-->
	<div class="row">
		<div class="col-md-12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
			Detail Cart
			</h3>
			<ul class="page-breadcrumb breadcrumb">
				<li>
					<i class="fa fa-home"></i>
					<a href="">
						Home
					</a>
					<i class="fa fa-angle-right"></i>
				</li>
                <li>
					<a href="<?php echo $this->Admin->admin_url() ?>cart">
						Cart list
					</a>
					<i class="fa fa-angle-right"></i>
				</li>
				<li>
					<a href="javascript:void(0)">
						Detail Cart
					</a>
				</li>

			</ul>
			<!-- END PAGE TITLE & BREADCRUMB-->
		</div>
	</div>
	<!-- END PAGE HEADER-->
	<!-- BEGIN PAGE CONTENT-->
    <div class="row">
		<div class="col-md-12">
			<!-- BEGIN EXAMPLE TABLE PORTLET-->
			<div class="portlet box yellow">
				<div class="portlet-title">
					<div class="caption">
						<i class="fa fa-cogs"></i>User table
					</div>
				</div>
				<div class="portlet-body">
					<div class="table-responsive">
						<table class="table table-striped table-bordered table-hover">
						<tbody>
						<tr>
							<td width="10%">
								 <strong>Name User</strong>
							</td>
							<td width="40%">
								 <a href=""><?php echo $user_info['User']['name'] ?></a>
							</td>
							<td width="10%">
								 <strong>Gender</strong>
							</td>
							<td width="40%">
								 <?php 
                                    if($user_info['User']['gender'] == 1) echo 'Nam';
                                    if($user_info['User']['gender'] == 0) echo 'Nữ';
                                 ?>
							</td>
							
						</tr>
						<tr>
							<td>
								 <strong>Phone</strong>
							</td>
							<td>
								 <?php echo $user_info['User']['phone'] ?>
							</td>
							<td>
								 <strong>Email</strong>
							</td>
							<td>
								 <?php echo $user_info['User']['email'] ?>
							</td>
						</tr>
						<tr>
							<td>
								 <strong>address</strong>
							</td>
							<td colspan="3">
								 <?php echo $user_info['User']['address'] ?>
							</td>
							
						</tr>
						</tbody>
						</table>
					</div>
				</div>
			</div>
			<!-- END EXAMPLE TABLE PORTLET-->
		</div>
	</div>
    <div class="row">
		<div class="col-md-12">
			<!-- BEGIN EXAMPLE TABLE PORTLET-->
			<div class="portlet box blue">
				<div class="portlet-title">
					<div class="caption">
						<i class="fa fa-cogs"></i>Cart detail
					</div>
				</div>
				<div class="portlet-body">
					<div class="table-responsive">
						<table class="table table-striped table-bordered table-hover">
						<thead>
						<tr>
							<th width="5%" class="align_center">
								 Nu
							</th>
							<th>
								 Name product
							</th>
							<th width="10%" class="align_center">
								 Number
							</th>
							<th>
								 Price
							</th>
							<th>
								 Discount
							</th>
							<th>
								 Money
							</th>
						</tr>
						</thead>
						<tbody>
                        <?php
                            $i = 1;
                            $sum = 0;
                            foreach($detail_cart as $value)
                            {
                                $price = ($value['cart_detail']['discount'] == '' || $value['cart_detail']['discount'] == 0) ? $value['cart_detail']['price'] : $value['cart_detail']['discount'];                                
                                $money =  $price * $value['cart_detail']['number'];
                                $sum += $money;
                        ?>
    						<tr>
    							<td class="align_center">
    								 <?php echo $i++ ?>
    							</td>
    							<td>
    								 <?php echo $value['product_desc']['title'] ?>
    							</td>
    							<td class="align_center">
    								  <?php echo $value['cart_detail']['number'] ?>
    							</td>
    							<td>
    								  <?php echo number_format($value['cart_detail']['price'],0,',','.') ?>
    							</td>
    							<td>
    								  <?php echo number_format($value['cart_detail']['discount'],0,',','.') ?>
    							</td>
    							<td>
    								  <?php echo number_format($money,0,',','.') ?>
    							</td>
    
    						</tr>
						<?php
                        }
                        ?>
                            <tr>
                                <td style="text-align:right" colspan="5"><strong>SUM</strong></td>
                                <td><strong><?php echo number_format($sum,0,',','.') ?></strong></td>
                            </tr>
						</tbody>
						</table>
					</div>
				</div>
			</div>
			<!-- END EXAMPLE TABLE PORTLET-->
		</div>
	</div>
	<!-- END PAGE CONTENT-->
</div>